<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>函数</title>
	</head>
	<body>
		<!--<p> 整数1<input type="text"  id="n1" /></p>
		<p> <input type="text"  id="n2" /></p>
		<p>
			<button onclick="jsq('+')">相加</button>
			<button onclick="jsq('-')">相减</button>
			<button onclick="jsq('*')">相乘</button>
			<button onclick="jsq('/')">相除</button>
		</p>
		<p>结果：<input type="text" id="res"/></p>-->
		
		<script type="text/javascript">
			function jc(n){
				if (n === 1) {
					return 1 ;
				} else{
					return n * jc(n - 1);
				}
			}
			console.log(jc(5));
		</script>
	</body>
</html>
